package com.smalljj.service.impl;

import org.springframework.beans.factory.annotation.Autowired;

import com.smalljj.bean.User;
import com.smalljj.bean.UserKey;
import com.smalljj.dao.UserDao;
import com.smalljj.service.UserService;

public class UserServiceImpl implements UserService {

	@Autowired
	private UserDao userDao;
	
	@Override
	public boolean insert(User user) throws Exception {
		return userDao.insert(user);
	}

	@Override
	public User findByKey(UserKey keyBean) throws Exception {
		return userDao.findByKey(keyBean);
	}
	
	@Override
	public User findUserByName(String userName)throws Exception{
		return userDao.findUserByName(userName);
	}
	
	@Override
	public boolean updateUser(User user) throws Exception {
		return userDao.update(user);
	}

}
